// nav/rootComponent.js
// UI组件
import React from 'react';
import { Link, BrowserRouter as Router, } from 'react-router-dom';

export default class Root extends React.Component {
  constructor() {
    super();
  }

  render() {
    return (
        <div>
            <Router>
                <Link to='/react1'>
                    <span style={{marginLeft: '20%', marginRight: '50%'}}>react1</span>
                </Link>
                <Link to='/react2'>
                    <span>react2</span>
                </Link>
            </Router>
        </div>
    );
  }
}
